import { Breadcrumb, Button, Table, Space, Row, Modal, Col, TableProps, Popover, message } from 'antd';
import React, { FC } from 'react';
import {
  FormPanel,
  type FormPanelObject,
  StandUploadExcel,
  InputType,
  RuleType,
  FormPanelBtnAlign,
  ExtendReader,
  Utils,
} from 'lfun-bg-comp';
import { DownOutlined } from '@ant-design/icons';
import { useNavigate } from 'react-router-dom';
import _ from 'lodash';
import dayjs from 'dayjs';
import { PageContainer } from '@/component/page-container';
import { GENDER, YES_NO } from '@/constant/basicOptions';
import { PAGINATIONCONFIG } from '@/constant/page';
import { POLITICAL_STATUS } from '@/constant/studentOptions';
import {
  EDUCATIONAL_BACKGROUND,
  HIGHEST_EDUCATION,
  POSITION_TYPE,
  RETIRE_TYPE,
  STAFFING_ARRANGEMENT,
  TCHR_CHANGE_REASON,
  TCHR_CHANGE_RESON_TYPE,
  TCHR_CHANGE_TYPE,
  TEACHER_WORK_STATUS,
} from '@/constant/teachOptions';
import { TeachersSrv } from '@/service/teacher';
import utils, { getPathRoot, get_stoge_pz, set_stoge_pz } from '@/utils';
import styles from './index.less';
import { searchSchoolOptions } from '@/service/options';
import { Transaction, createTransaction, createRetire } from '@/service/teacher/transaction';
import TransferoutPopup from './op/transferoutPopup';
import EmployeeGroups from './op/employeeGroups';
import BorrowPopup from './op/borrowPopup';
import PermissionButton, { isPermissionOperate } from '@/component/permission-button';

interface DataType {
  key: React.Key;
  teacher_id: string;
  teacher_name: string;
  teacher_id_number: string;
  teacher_sub_status: string;
  is_approval: boolean;
}
const transferList = [
  {
    title: '校内异动',
    labelCol: { span: 6 },
    wrapperCol: { span: 18 },
    span: 12,
    inputs: [
      {
        label: '异动类型',
        name: 'change_type',
        key: 'change_type',
        relationFields: ['change_reson', 'remark'],
        inputType: 'radio',
        required: true,
        renderOption: TCHR_CHANGE_TYPE,
      },
      {
        label: '异动原因',
        name: 'change_reson',
        key: 'change_reson',
        required: true,
        inputType: InputType.select,
        renderOption: TCHR_CHANGE_REASON,
        hidden: (form: FormPanelObject) => {
          return form?.getFieldValue('change_type') !== 'change';
        },
      },
      {
        label: '备注',
        name: 'remark',
        key: 'remark',
        inputType: InputType.textarea,
        textRange: [0, 200],
        hidden: (form: FormPanelObject) => {
          return form?.getFieldValue('change_type') !== 'change';
        },
      },
    ],
  },
];

const changeList = [
  {
    title: '',
    span: 24,
    labelCol: { span: 6 },
    wrapperCol: { span: 18 },
    inputs: [
      {
        label: '变动教职工姓名',
        name: 'employee_names',
        key: 'employee_names',
        inputType: 'children',
        children: <EmployeeGroups />,
      },
      {
        label: '变动类型',
        name: 'transaction_type',
        key: 'transaction_type',
        required: true,
        inputType: 'select',
        renderOption: TCHR_CHANGE_RESON_TYPE,
      },
      {
        label: '原任职岗位',
        name: 'current_position',
        key: 'current_position',
        required: true,
        inputType: 'cascader',
        renderOption: POSITION_TYPE, //TODO:类型无
        formatSubmitValue: (value: any) => {
          if (value && value.length && value.length > 0) {
            return value.join(',');
          }
          return value;
        },
      },
      {
        label: '现任职岗位',
        name: 'original_position',
        key: 'original_position',
        required: true,
        inputType: InputType.cascader,
        renderOption: POSITION_TYPE, //TODO:类型无
        formatSubmitValue: (value: any) => {
          if (value && value.length && value.length > 0) {
            return value.join(',');
          }
          return value;
        },
      },
      {
        label: '开始任职日期',
        name: 'position_date',
        key: 'position_date',
        required: true,
        inputType: InputType.date,
        formatSubmitValue: (value: any) => {
          if (value && value.isValid && value.isValid()) {
            return dayjs(value).format('YYYY-MM-DD');
          }
          return value;
        },
      },
      {
        label: '备注',
        name: 'transaction_remark',
        key: 'transaction_remark',
        required: false,
        inputType: InputType.textarea,
        textRange: [0, 200],
      },
    ],
  },
];
const retireList = [
  {
    title: '',
    span: 24,
    labelCol: { span: 6 },
    wrapperCol: { span: 18 },
    inputs: [
      {
        label: '姓名',
        name: 'employee_names',
        key: 'employee_names',
        inputType: InputType.children,
        children: <EmployeeGroups />,
      },
      {
        label: '离/退休证号',
        name: 'retire_number',
        key: 'retire_number',
        required: true,
        textRange: [0, 30],
      },
      {
        label: '类型',
        name: 'transaction_type',
        key: 'transaction_type',
        required: true,
        inputType: InputType.select,
        renderOption: RETIRE_TYPE,
      },
      {
        label: '离/退休时间',
        name: 'retire_date',
        key: 'retire_date',
        required: true,
        inputType: InputType.date,
        formatSubmitValue: (value: any) => {
          if (value && value.isValid && value.isValid()) {
            return dayjs(value).format('YYYY-MM-DD');
          }
          return value;
        },
      },
    ],
  },
];
const Groups: FC = () => {
  const [loading, setLoading] = React.useState(false);
  const [data, setData] = React.useState([]);
  const [total, setTotal] = React.useState(0);
  const [pageSize, setPageSize] = React.useState(get_stoge_pz());
  const [pageIndex, setPageIndex] = React.useState(1);
  const [form, setForm] = React.useState(null);
  const [showTransferForm, setShowTransferForm] = React.useState(false);
  const [selectDataType, setSelectDataType] = React.useState<DataType[]>([]);
  const [showChangeForm, setShowChangeForm] = React.useState(false);
  const [showTransferoutForm, setShowTransferoutForm] = React.useState(false);
  const [showBorrowoutForm, setShowBorrowoutForm] = React.useState(false);
  const [singleSelectDataType, setSingleSelectDataType] = React.useState<DataType[]>([]);
  const [hasSingleSelect, setHasSingleSelect] = React.useState(false);
  const [showRetireForm, setShowRetireForm] = React.useState(false);
  const [changeForm, setChangeForm] = React.useState<FormPanelObject>();
  const [expand, setExpand] = React.useState(false);
  const isSchool = Utils.getProps('isSchool');

  const pageChange = (page, per_page) => {
    set_stoge_pz(pageSize);
    fetchData({ ...form?.getFieldsValue(), page, per_page });
  };

  const navigate = useNavigate();

  const handleView = record => {
    navigate(`${getPathRoot()}/employed/details/${record.teacher_id}`);
  };

  const columns: TableProps['columns'] = [
    {
      title: '教职工编码',
      fixed: 'left',
      dataIndex: 'teacher_id',
      key: 'teacher_id',
    },
    {
      title: '姓名',
      fixed: 'left',
      dataIndex: 'teacher_name',
      key: 'teacher_name',
    },
    {
      title: '性别',
      dataIndex: 'teacher_gender',
      key: 'teacher_gender',
      render: (text: any) => {
        return _.find(GENDER, { value: String(text) })?.label;
      },
    },
    {
      title: '教职工号',
      fixed: 'left',
      dataIndex: 'teacher_base_id',
      key: 'teacher_base_id',
    },
    {
      title: '状态',
      dataIndex: 'teacher_sub_status',
      key: 'teacher_sub_status',
      render: (text: any) => {
        return _.find(TEACHER_WORK_STATUS, { value: String(text) })?.label;
      },
    },
    {
      title: '手机号',
      dataIndex: 'teacher_phone_number',
      key: 'teacher_phone_number',
    },
    {
      title: '身份证号',
      dataIndex: 'teacher_id_number',
      key: 'teacher_id_number',
    },

    {
      title: '任职单位',
      dataIndex: 'school_name',
      key: 'school_name',
    },
    // {
    //   title: '最高学历',
    //   dataIndex: 'highest_education',
    //   key: 'highest_education',
    //   render: (text: any) => {
    //     if (!text) return '';
    //     text = _.isArray(text) ? text : text.split(',');
    //     const arr: any[] = text.map(v => utils.findLabelDeep(HIGHEST_EDUCATION, String(v)));
    //     return arr.join('-');
    //   },
    // },
    // {
    //   title: '政治面貌',
    //   dataIndex: 'political_status',
    //   key: 'political_status',
    //   render: (text: any) => {
    //     return _.find(POLITICAL_STATUS, { value: String(text) })?.label;
    //   },
    // },
    // {
    //   title: '是否在编',
    //   key: 'in_post',
    //   dataIndex: 'in_post',
    //   render: (text: any) => {
    //     return text ? YES_NO[0].label : YES_NO[1].label;
    //   },
    // },
    // {
    //   title: '用人形式',
    //   dataIndex: 'employment_form',
    //   key: 'employment_form',
    //   render: (text: any) => {
    //     return _.find(STAFFING_ARRANGEMENT, { value: String(text) })?.label;
    //   },
    // },
    // {
    //   title: '进入本校时间',
    //   dataIndex: 'enter_school_time',
    //   key: 'enter_school_time',
    //   render: (text: any) => {
    //     return dayjs(text).format('YYYY-MM-DD');
    //   },
    // },
    {
      title: '操作',
      key: 'actions',
      //width: 380,
      align: 'center',
      fixed: 'right',
      // hidden: !isPermissionOperate(),
      render: (text, record) => (
        <>
          <Button type="link" onClick={() => handleView(record)}>
            查看
          </Button>
          <PermissionButton permission="view">
            <Button type="link" onClick={() => handleView(record)}>
              查看
            </Button>
          </PermissionButton>
          {/* <Button type="link" onClick={() => handleTransfer(record)}>
            异动
          </Button> */}

          {!record.is_approval && isSchool && (
            <>
              <PermissionButton permission="edit">
                <Button type="link" onClick={() => handleUpdate(record)}>
                  变更
                </Button>
              </PermissionButton>
              {record.teacher_sub_status === 'active' && (
                <>
                  <PermissionButton permission="transaction">
                    <Button type="link" onClick={() => handleChange(record)}>
                      变动
                    </Button>
                  </PermissionButton>
                  <PermissionButton permission="transferOut">
                    <Button type="link" onClick={() => handleTransfer(record)}>
                      调出
                    </Button>
                  </PermissionButton>
                  <PermissionButton permission="borrowOut">
                    <Button type="link" onClick={() => handleBorrow(record)}>
                      借出
                    </Button>
                  </PermissionButton>
                  <PermissionButton permission="retire">
                    <Button type="link" onClick={() => handleRetire(record)}>
                      离职退休
                    </Button>
                  </PermissionButton>
                </>
              )}
            </>
          )}
        </>
      ),
    },
  ];

  const searchList = [
    {
      title: '',
      labelCol: { span: 6 },
      wrapperCol: { span: 18 },
      inputs: [
        {
          label: '教职工编码',
          name: 'teacher_code',
          key: 'teacher_code',
          textRange: [0, 20],
        },
        {
          label: '姓名',
          name: 'teacher_name',
          key: 'teacher_name',
          textRange: [0, 20],
        },
        {
          label: '性别',
          name: 'teacher_gender',
          key: 'teacher_gender',
          inputType: InputType.select,
          renderOption: GENDER,
        },
        {
          label: '国籍/地区',
          name: 'teacher_nationality',
          key: 'teacher_nationality',
          inputType: InputType.select,
          renderOption: GENDER,
        },
        {
          label: '手机号',
          name: 'teacher_mobile',
          key: 'teacher_mobile',
          textRange: [0, 20],
        },
        {
          label: '身份证类型',
          name: 'teacher_id_type',
          key: 'teacher_id_type',
          inputType: InputType.select,
          renderOption: GENDER,
        },
        {
          label: '身份证号',
          name: 'teacher_id_number',
          key: 'teacher_id_number',
          textRange: [0, 18],
        },
        {
          label: '政治面貌',
          name: 'political_status',
          key: 'political_status',
          inputType: InputType.select,
          renderOption: POLITICAL_STATUS,
        },
        {
          label: '最高学历',
          name: 'highest_education',
          key: 'highest_education',
          inputType: InputType.cascader,
          renderOption: EDUCATIONAL_BACKGROUND,
        },
        {
          label: '出生日期',
          name: 'teacher_date_of_birth',
          key: 'teacher_date_of_birth',
          inputType: InputType.date,
        },
        {
          label: '教职工来源',
          name: 'teacher_source',
          key: 'teacher_source',
          inputType: InputType.select,
          renderOption: GENDER,
        },
        {
          label: '是否在编',
          name: 'teacher_onboarding',
          key: 'teacher_onboarding',
          inputType: InputType.select,
          renderOption: GENDER,
        },
        {
          label: '用人形式',
          name: 'teacher_employment_form',
          key: 'teacher_employment_form',
          inputType: InputType.select,
          renderOption: GENDER,
        },
        {
          label: '教师资格证',
          name: 'teacher_qualification_certificate',
          key: 'teacher_qualification_certificate',
          inputType: InputType.select,
          renderOption: GENDER,
        },
        {
          label: '是否县级及以上骨干教师',
          name: 'teacher_qualification_certificate',
          key: 'teacher_qualification_certificate',
          inputType: InputType.select,
          renderOption: GENDER,
        },
        {
          label: '教职工类别',
          name: 'teacher_category',
          key: 'teacher_category',
          inputType: InputType.select,
          renderOption: GENDER,
        },
        {
          label: '现任岗位类型',
          name: 'teacher_category',
          key: 'teacher_category',
          inputType: InputType.select,
          renderOption: GENDER,
        },
        {
          label: '现任岗位等级',
          name: 'teacher_category',
          key: 'teacher_category',
          inputType: InputType.select,
          renderOption: GENDER,
        },
        {
          label: '现任专业技术职务',
          name: 'teacher_category',
          key: 'teacher_category',
          inputType: InputType.select,
          renderOption: GENDER,
        },
        {
          label: '参加工作年月',
          name: 'teacher_date_of_employment',
          key: 'teacher_date_of_employment',
          inputType: InputType.date,
        },
        {
          label: '进校年月',
          name: 'enter_school_time',
          key: 'enter_school_time',
          inputType: InputType.dateRange,
          formatSubmitValue: (value, formPanelObject: FormPanelObject) => {
            ExtendReader.formatSubmitValueByDateRange(value, formPanelObject, 'enter_school_time');
            return null;
          },
        },
        {
          label: '是否新教职工',
          name: 'teacher_category',
          key: 'teacher_category',
          inputType: InputType.select,
          renderOption: YES_NO,
        },
      ],
    },
  ];

  const searchTemplate = () => {
    const inputs = _.cloneDeep(searchList);
    inputs[0].inputs = expand ? inputs[0].inputs : inputs[0].inputs.slice(0, 9);
    return inputs;
  };

  React.useEffect(() => {
    fetchData({ page: pageIndex, per_page: pageSize });
  }, []);

  /** 获取数据 */
  const fetchData = async params => {
    console.log('🚀 ~ fetchData ~ params:', params);
    // 判断 highest_education 是不是数组，并且为真
    if (params.highest_education && Array.isArray(params.highest_education) && params.highest_education.length) {
      params.highest_education = params.highest_education.join(',');
    }

    if (params?.enter_school_time) {
      params.enter_school_time = dayjs(params.enter_school_time).format('YYYY-MM-DD');
    }

    setLoading(true);
    try {
      const { success, data } = await TeachersSrv.list(params);
      console.log('🚀 ~ fetchData ~ data:', data);
      if (success) {
        setData(
          data.items.map((it, idx) => {
            return {
              key: idx,
              ...it,
            };
          })
        );
        setTotal(data.total);
        setPageSize(params.per_page);
        setPageIndex(params.page);
      }
    } catch (error) {
      console.error('Error fetching data:', error);
    } finally {
      setLoading(false);
    }
  };

  const rowSelection = {
    onChange: (selectedRowKeys: React.Key[], selectedRows: DataType[]) => {
      setSelectDataType(selectedRows);
      console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
    },
    getCheckboxProps: (record: DataType) => {
      return {
        disabled: record.is_approval || record.teacher_sub_status !== 'active', //!== 'active', // Column configuration not to be checked
        name: record.teacher_id_number,
        key: record.teacher_id,
        teacher_id: record.teacher_id,
        is_approval: record.is_approval,
        teacher_name: record.teacher_name,
        teacher_sub_status: record.teacher_sub_status,
      };
    },
  };
  // // 变更
  const handleUpdate = (record: any) => {
    navigate(`${getPathRoot()}/employed/change/${record.teacher_id}`);
    console.log(record);
  };
  // 变动
  const handleChange = (record?: any) => {
    if (record) {
      setHasSingleSelect(true);
      setSingleSelectDataType([record]);
      setShowChangeForm(true);
    } else if (selectDataType.length === 0) {
      message.warning('请选择一名老师');
    } else {
      setHasSingleSelect(false);
      setShowChangeForm(true);
    }
  };
  // 调动
  const handleTransfer = (record?: any) => {
    if (record) {
      setHasSingleSelect(true);
      setSingleSelectDataType([record]);
      setShowTransferoutForm(true);
    } else if (selectDataType.length === 0) {
      message.warning('请选择一名老师');
    } else {
      setHasSingleSelect(false);
      setShowTransferoutForm(true);
    }
  };
  // 借动
  const handleBorrow = (record?: any) => {
    if (record) {
      setHasSingleSelect(true);
      setSingleSelectDataType([record]);
      setShowBorrowoutForm(true);
    } else if (selectDataType.length === 0) {
      message.warning('请选择一名老师');
    } else {
      setHasSingleSelect(false);
      setShowBorrowoutForm(true);
    }
  };
  // 离退休
  const handleRetire = (record?: any) => {
    if (record) {
      setHasSingleSelect(true);
      setSingleSelectDataType([record]);
      setShowRetireForm(true);
    } else if (selectDataType.length === 0) {
      message.warning('请选择一名老师');
    } else {
      setHasSingleSelect(false);
      setShowRetireForm(true);
    }
  };

  const buttonsForm = () => {
    return [
      <a
        style={{ fontSize: 12 }}
        onClick={() => {
          setExpand(!expand);
        }}
      >
        <DownOutlined rotate={expand ? 180 : 0} /> {expand ? '收起' : '展开'}
      </a>,
    ];
  };

  return (
    <PageContainer header={<Breadcrumb items={[{ title: '人员信息管理' }]} />}>
      <FormPanel
        btnsAlign={FormPanelBtnAlign.right}
        restBtnText="重置"
        submitBtnText="查询"
        buttons={buttonsForm()}
        onFinish={(form: FormPanelObject) => {
          const params = form.getFieldsValue();
          fetchData({ ...params, page: 1, per_page: pageSize });
          setForm(form);
          return false;
        }}
        onReset={() => {
          fetchData({ page: 1, per_page: pageSize });
          form.resetFields();
        }}
        template={searchTemplate()}
      />
      <Row className={styles.extend_btns}>
        <Col span={12}>
          <Space align="center">
            <PermissionButton permission="export">
              <Button type="primary">导出</Button>
            </PermissionButton>
            {isSchool && (
              <>
                <PermissionButton permission="transferIn">
                  <Button type="primary" onClick={() => navigate(`${getPathRoot()}/employed/transferin/0`)}>
                    调入教职工
                  </Button>
                </PermissionButton>
                <PermissionButton permission="borrowIn">
                  <Button type="primary" onClick={() => navigate(`${getPathRoot()}/employed/borrowin/0`)}>
                    借入教职工
                  </Button>
                </PermissionButton>
              </>
            )}
          </Space>
        </Col>
        <Col span={12}>
          {isSchool && (
            <Space align="center" style={{ textAlign: 'right' }}>
              {/* <Button type="primary">离职退休</Button> */}
              {/* <Button type="primary" onClick={() => handleChange()}>
              变动
            </Button> */}
              <PermissionButton permission="transferOut">
                <Button type="primary" onClick={() => handleTransfer()}>
                  调出
                </Button>
              </PermissionButton>
              <PermissionButton permission="borrowOut">
                <Button type="primary" onClick={() => handleBorrow()}>
                  借出
                </Button>
              </PermissionButton>
              {/* <Button type="primary">批量审批</Button> */}
            </Space>
          )}
        </Col>
      </Row>
      <Table
        loading={loading}
        dataSource={data}
        columns={columns}
        scroll={{ x: 'max-content' }}
        rowSelection={{
          ...rowSelection,
        }}
        pagination={{ ...PAGINATIONCONFIG, total, pageSize, current: pageIndex, onChange: pageChange }}
      />
      <Modal
        open={showTransferForm}
        width="1000px"
        footer={null}
        title="人员信息异动"
        onCancel={() => setShowTransferForm(false)}
      >
        <FormPanel
          id="transfer-form"
          template={transferList}
          values={{ change_type: '' }}
          buttonsDisplay="block"
          submitBtnText="提交"
          restBtnText="取消"
          onFinish={(form: FormPanelObject) => {
            const params: any = form.getFieldsValue();
            if (params.change_type !== 'change') {
              navigate(`${getPathRoot()}/employed/workchange`);
            }
            console.log('🚀 ~ params:', params);
          }}
          onReset={() => {
            setShowTransferForm(false);
            return false;
          }}
        />
      </Modal>
      <Modal
        open={showChangeForm}
        width="1000px"
        footer={null}
        title="教职工变动"
        onCancel={() => {
          setShowChangeForm(false);
          changeForm.resetFields();
        }}
      >
        <FormPanel
          id="change-form"
          template={changeList}
          values={{ employee_names: hasSingleSelect ? singleSelectDataType : selectDataType }}
          buttonsDisplay="block"
          submitBtnText="提交"
          restBtnText="取消"
          onLoad={(form: FormPanelObject) => {
            setChangeForm(form);
          }}
          onFinish={async (form: FormPanelObject) => {
            const vals: Transaction = {
              ...form.getFieldsValue(),
            };
            vals.teacher_id = form.getFieldValue('employee_names')[0].teacher_id;
            const res = await createTransaction(vals);
            if (res.success) {
              message.success('操作成功');
              fetchData({ page: pageIndex, per_page: pageSize });
              form.resetFields();
              setShowChangeForm(false);
            } else {
              form.reVaildation(res);
            }
            console.log(form);
          }}
          onReset={(form: FormPanelObject) => {
            setShowChangeForm(false);
            form.resetFields();
            return false;
          }}
        />
      </Modal>
      <TransferoutPopup
        onFinish={() => {
          fetchData({ page: pageIndex, per_page: pageSize });
          setShowTransferoutForm(false);
        }}
        showTransferoutForm={showTransferoutForm}
        setShowTransferoutForm={setShowTransferoutForm}
        selectDataType={hasSingleSelect ? singleSelectDataType : selectDataType}
      />
      {/* <Modal
        open={showBorrowoutForm}
        width="1000px"
        footer={null}
        title="教职工借出"
        onCancel={() => setShowBorrowoutForm(false)}
      > */}
      <Modal
        open={showRetireForm}
        width="1000px"
        footer={null}
        title="离退休"
        onCancel={() => setShowRetireForm(false)}
      >
        <FormPanel
          id="retire-form"
          template={retireList}
          values={{ employee_names: hasSingleSelect ? singleSelectDataType : selectDataType }}
          buttonsDisplay="block"
          submitBtnText="提交"
          restBtnText="取消"
          onFinish={async (form: FormPanelObject) => {
            const vals: Transaction = {
              ...form.getFieldsValue(),
            };
            vals.teacher_id = form.getFieldValue('employee_names')[0].teacher_id;
            const res = await createRetire(vals);
            if (res.success) {
              message.success('操作成功');
              fetchData({ page: pageIndex, per_page: pageSize });
              setShowRetireForm(false);
              form.resetFields();
            } else {
              form.reVaildation(res);
            }
            console.log(form);
          }}
          onReset={() => {
            setShowRetireForm(false);
            return false;
          }}
        />
      </Modal>
      <BorrowPopup
        onFinish={() => {
          fetchData({ page: pageIndex, per_page: pageSize });
          setShowBorrowoutForm(false);
        }}
        showTransferoutForm={showBorrowoutForm}
        setShowTransferoutForm={setShowBorrowoutForm}
        selectDataType={hasSingleSelect ? singleSelectDataType : selectDataType}
      />
      {/* <FormPanel
          id="borrowout-form"
          template={borrowoutoutList}
          values={{ employee_names: hasSingleSelect ? singleSelectDataType : selectDataType }}
          buttonsDisplay="block"
          submitBtnText="提交"
          restBtnText="取消"
          onFinish={(form: FormPanelObject) => {
            console.log(form);
          }}
          onReset={() => {
            setShowBorrowoutForm(false);
            return false;
          }}
        />
      </Modal> */}
    </PageContainer>
  );
};

export default Groups;
